const express = require("express");

const app = express();

//跨域
const cors = require("cors")
app.use(cors())

//表单解析
app.use(express.urlencoded({extended: true}))
app.use(express.json())
//导入任务模块注册
const taskRouter = require("./router/index")
app.use('/task', taskRouter)

const fileUpload = require("./router/fileUpload")
app.use('/file', fileUpload)

app.listen(8090, () => {
    console.log("server running at http://127.0.0.1")
})
